package com.dhcc.DRGsHosp.facade.impl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.inject.Inject;
import javax.inject.Named;

import com.dhcc.DRGsHosp.application.WordDRGsReportApplication;
import com.dhcc.DRGsHosp.facade.DrgsIndexCalFacade;
import com.dhcc.DRGsHosp.facade.WordDRGsReportFacade;
import com.dhcc.DRGsHosp.infra.util.Arith;

/**
 * 
  * @Description:简版新版分析报告导出
  * @Author:ShaoZhiYuan
  * @Date:2017年2月14日 下午2:25:40 
  * @version :2.3.2
  * @copyright:DHC 2015-2016
 */
@Named("drgsHospFacadeImpl46")
public class WordDRGsReportFacadeImpl implements WordDRGsReportFacade  {

	@Inject
	private WordDRGsReportApplication wordDRGsReportApplication;
	

	/*
	 * 看日期区间内是否有数据
	 */
	@Override
	public int findDataIsNull(String dataFrom, String dataTo,String groupScheme,String hospCode) {
		return  wordDRGsReportApplication.findDataIsNull(dataFrom,dataTo,groupScheme,hospCode);
	}
	/*
	 * 获取新增病组
	 */
	@Override
	public List<Object[]> findNewDrgs(String dateFrom, String dateTo, String stdId ,String groupScheme,String hospCode ) {
		 return  wordDRGsReportApplication.findNewDrgs(dateFrom,dateTo, stdId , groupScheme, hospCode);
	}
	/**
	 * 
	  * @Description:获取出院病历术，大于60.如组数， 入组率  
	  * @param paramMap
	  * @return
	 */
	@Override
	public Object[] findSimpHospBaseQuota(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findSimpHospBaseQuota(paramMap);
	}
	/**
	 * 
	  * @Description:获取科室数量  
	  * @return
	 */
	@Override
	public int findDepCount() {
		return  wordDRGsReportApplication.findDepCount();
	}
	/**
	 * 
	  * @Description: 获取当前系统中可用标杆 
	  * @return
	 */
	@Override
	public List<Object[]> getBenchmarkYear() {
		return wordDRGsReportApplication.getBenchmarkYear();
	}
	/**  
	 * @Description: 根据分组方案获取分组器版本号
	 * @author shaozhiyuan 
	 * @date 2018年10月11日  
	 * @version V3.1.1
	 */  
	@Override
	public String getDRGversionCode(String groupScheme) {
		return wordDRGsReportApplication.getDRGversionCode(groupScheme);
	}
	/**
	 * 
	  * @Description:获取分组器版本号  
	  * @param paramMap
	  * @return
	 */
	@Override
	public String getDRGversion(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.getDRGversion(paramMap);
	}
	/**
	 * 
	  * @Description:表格二中出院病例数，次均费用，药占比等  
	  * @param paramMap
	  * @return
	 */
	@Override
	public Object[] findSimpHospBaseTable2(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findSimpHospBaseTable2(paramMap);
	}
	/**
	 * 
	  * @Description:表格四中drg组数，cmi，总权重  
	  * @param paramMap
	  * @return
	 */
	@Override
	public Object[] findSimpHospBaseTable4(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findSimpHospBaseTable4(paramMap);
	}
	/**
	 * 
	 * @methodname    :findHospCaseOperationCount
	 * @description   :获取全院手术病例总数 
	 * @param         :Map<String,Object> paramMap
	 * @author        :liqingyang
	 * @return        :String
	 * @date          :2016年3月29日
	 */
	public String findHospCaseOperationCount(Map<String,Object> paramMap){
		return wordDRGsReportApplication.findHospCaseOperationCount(paramMap);
	}
	/**
	 * 
	  * @Description:获取手术级别信息  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findOperCaseByLvel(Map<String, Object> paramMap) {
		 return  wordDRGsReportApplication.findOperCaseByLvel( paramMap);
	}
	/**
	 * 
	  * @Description:查询手术级别信息  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Map<String, Object>> findOperLevelInfo(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findOperLevelInfo(paramMap);
	}
	/**
	 * 
	  * @Description:获取主要手术个数种类  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findMainOperList(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findMainOperList(paramMap);
	}
	/**
	 * 
	 * @Description:计算前20的主要手术的病例里哪两个手术最多  
	 * @param paramMap
	 * @return
	 */
	@Override
	public List<Object[]> findMainOperLevelList(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findMainOperLevelList(paramMap);
	}
	/**
	 * 
	  * @Description:获取前五位的手术编码  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findTop5OperCode(Map<String, Object> paramMap) {
		 return  wordDRGsReportApplication.findTop5OperCode( paramMap);
	}
	/**
	 * 
	  * @Description:第5的手术编码科室分布  
	  * @param paramMap
	  * @param object
	  * @return
	 */
	@Override
	public List<Map<String, Object>> top5OpercodedepListByOperCode(Map<String, Object> paramMap, Object object) {
		 return  wordDRGsReportApplication.top5OpercodedepListByOperCode( paramMap,object);
	}
	/**
	 * 
	  * @Description:一级手术前5手术编码，名称，频次，占本级手术的占比  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findmainOperLevelInfo(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findmainOperLevelInfo(paramMap);
	}
	/**
	 * 
	  * @Description: 获取各级手术的出现频率最高的手术 
	  * @param paramMap
	  * @param level
	  * @return
	 */
	@Override
	public List<Object[]> findmainOperByLevelInfo(Map<String, Object> paramMap, String level) {
		return  wordDRGsReportApplication.findmainOperByLevelInfo(paramMap,level);
	}
	/**
	 * 
	  * @Description: 获取全院DRGs病组 
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findHospDRGsInfo(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findHospDRGsInfo(paramMap);
	}
	/**
	 * 
	  * @Description:获取伴合并症的人数  
	  * @param paramMap
	  * @param object
	  * @return
	 */
	@Override
	public List<Object[]> findPersonCnt(Map<String, Object> paramMap) {
		return  wordDRGsReportApplication.findPersonCnt(paramMap);
	}
	/**
	 * 
	  * @Description: 获取当前时间段内科室组的数量 
	  * @param paramMap
	  * @return
	 */
	@Override
	public int findHospNowDepCnt(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findHospNowDepCnt(paramMap);
	}
	/**
	 * 
	 * @Description:获取科室权重和CMI  
	 * @param paramMap
	 * @return
	 */
	@Override
	public List<Map<String, Object>> findDepWeightAndCMI(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findDepWeightAndCMI(paramMap);
	}
	/**
	 * 
	 * @methodname    :findEfficiencyDepInfoList
	 * @description   :获取效率科室情况相关信息(费用消耗指数、时间消耗指数)
	 * @param         :Map<String,Object> paramMap
	 * @author        :liqingyang
	 * @return        :List<Object[]>
	 * @date          :2016年3月29日
	 */
	@Override
	public List<Object[]> findEfficiencyDepInfoList(Map<String,Object> paramMap){
		return 	wordDRGsReportApplication.findEfficiencyDepInfoList(paramMap);
	}
	/**
	 * 
	  * @Description:获取低风险死亡病例数  
	  * @param paramMap
	  * @return
	 */
	@Override
	public String findHospCaseRisk1Cnt(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findHospCaseRisk1Cnt(paramMap);
	}
	/**
	 * 
	  * @Description:获取低风险死亡人数各科室分布情况表  
	  * @param paramMap
	  * @return
	 */
	public List<Object[]> findQualityDepTableByRisk1List(Map<String,Object> paramMap){
		return wordDRGsReportApplication.findQualityDepTableByRisk1List(paramMap);
	}
	/**
	 * 
	  * @Description:获取中低风险死亡病例数  
	  * @param paramMap
	  * @return
	 */
	@Override
	public String findHospCaseRisk2Cnt(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findHospCaseRisk2Cnt(paramMap);
	}
	/**
	 * 
	  * @Description:获取中低风险死亡人数各科室分布情况表  
	  * @param paramMap
	  * @return
	 */
	public List<Object[]> findQualityDepTableByRisk2List(Map<String,Object> paramMap){
		return wordDRGsReportApplication.findQualityDepTableByRisk2List(paramMap);
	}
	/**
	 * 
	  * @Description:获取mdc总数  
	  * @param paramMap
	  * @return
	 */
	@Override
	public int findMdcCnt(Map<String, Object> paramMap) {
		 return  wordDRGsReportApplication.findMdcCnt(paramMap);
	}
	/**
	 * 
	  * @Description:获取缺失的MDC组   
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findOldLostMDCList(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findOldLostMDCList(paramMap);
	}
	/**
	 * 
	  * @Description:DRGs病组覆盖率最高的前五个MDC专业  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findOldHighRiskAboveMDCList(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findOldHighRiskAboveMDCList(paramMap);
	}
	/**
	 * 
	  * @Description:高难度高产出的MDC专业   
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findMdcCW(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findMdcCW(paramMap);
	}
	/**
	 * 
	  * @Description:获取各MDC下费用消耗指数和时间消耗指数     
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findFeeAndTimeEff(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findFeeAndTimeEff(paramMap);
	}
	/**
	 * 
	  * @Description:获取mdc低风险排序  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findmdcFTRisk1List(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findmdcFTRisk1List(paramMap);
	}
	/**
	 * 
	  * @Description:获取mdc中低风险排序  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findmdcFTRisk2List(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findmdcFTRisk2List(paramMap);
	}
	/**
	 * 
	  * @Description:一二级手术例数最多的前十名医师
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findDocOper1List(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findDocOper1List(paramMap);
	}
	/**
	 * 
	  * @Description:三四级手术例数最多的前十名医师
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findDocOper2List(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findDocOper2List(paramMap);
	}
	/**
	 * 
	  * @Description: 获取重点专科名称 
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findMdcDesc(Map<String, Object> paramMap) {
		 return  wordDRGsReportApplication.findMdcDesc(paramMap);
	}
	/**
	 * 
	  * @Description:重点专科下的病例数  
	  * @param paramMap
	  * @return
	 */
	@Override
	public int findMdcCaseCnt(Map<String, Object> paramMap) {
	 return  wordDRGsReportApplication.findMdcCaseCnt(paramMap);
	}
	/**
	 * 
	  * @Description:mdc下drgs组数  
	  * @param paramMap
	  * @return
	 */
	@Override
	public int findMdcDRGsCnt(Map<String, Object> paramMap) {
		 return  wordDRGsReportApplication.findMdcDRGsCnt(paramMap);
	}
    /**
     * 
      * @Description:mdc下真实drg组  
      * @param paramMap
      * @return
     */
	@Override
	public int findMdcDRGsRealCnt(Map<String, Object> paramMap) {
		 return  wordDRGsReportApplication.findMdcDRGsRealCnt(paramMap);
	}
	/**
	 * 
	  * @Description:重点专业下DRGS病组分析  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Map<String, Object>> findmdcDdrgtop10MapList(Map<String, Object> paramMap) {
		 return  wordDRGsReportApplication.findmdcDdrgtop10MapList(paramMap);
	}
	/**
	 * 
	 * @Description: 重点专业下DRGS权重分析 
	 * @param paramMap
	 * @return
	 */
	@Override
	public List<Map<String, Object>> findmdcdrgweighttop10List(Map<String, Object> paramMap) {
		 return  wordDRGsReportApplication.findmdcdrgweighttop10List(paramMap);
	}
	/**
	 * 
	  * @Description:计算重点mdc专业下总权重   
	  * @param paramMap
	  * @return
	 */
	@Override
	public String findmdctotalweightcount(Map<String, Object> paramMap) {
		 return  wordDRGsReportApplication.findmdctotalweightcount(paramMap);
	}
	/**
	 * 
	  * @Description:获取表格27标杆计算  
	  * @param paramMap
	  * @return
	 */
	@Override
	public Object[] findlistMDCbyTable27(Map<String, Object> paramMap) {
		return  wordDRGsReportApplication.findlistMDCbyTable27(paramMap);
	}
	/**
	 * 
	  * @Description: 未入组原因分析
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findNotInGroupReason(Map<String, Object> paramMap) {
		return  wordDRGsReportApplication.findNotInGroupReason(paramMap);
	}
	/**
	 * 
	  * @Description:大于60天的病例科室分布  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findDepOver60List(Map<String, Object> paramMap) {
		return  wordDRGsReportApplication.findDepOver60List(paramMap);
	}
	/**
	 * 
	  * @Description:未入组病例科室分布 
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findNotInGroupCaseByDepList(Map<String, Object> paramMap) {
		return  wordDRGsReportApplication.findNotInGroupCaseByDepList(paramMap);
	}
	/**
	 * 
	  * @Description:未入组病例主诊断分布  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findNotInGroupCaseByDiagList(Map<String, Object> paramMap) {
		return  wordDRGsReportApplication.findNotInGroupCaseByDiagList(paramMap);
	}
	/**
	 * 
	  * @Description:未入组病例手术分布  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findNotInGroupCaseByOperList(Map<String, Object> paramMap) {
		return  wordDRGsReportApplication.findNotInGroupCaseByOperList(paramMap);
	}
	/**
	 * 
	  * @Description:mdc专业drg覆盖率  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findMdcDrgsTop5List(Map<String, Object> paramMap) {
		return  wordDRGsReportApplication.findMdcDrgsTop5List(paramMap);
	}
	/**
	 * 
	  * @Description:院由低到高小于前五的mdc专业下缺失的drg的权重大于1
	  * @param paramMap
	  * @param mdcCodeLast5
	  * @return
	 */
	@Override
	public List<Object[]> findMdcDrgsByWeightOver1List(Map<String, Object> paramMap, String mdcCodeLast5) {
		return  wordDRGsReportApplication.findMdcDrgsByWeightOver1List(paramMap,mdcCodeLast5);
	}
	/**
	 * 
	  * @Description:院由低到高小于前五的mdc专业下缺失的drg的权重大于1的个数
	  * @param paramMaps
	  * @param mdcCodeLast5
	  * @return
	 */
	@Override
	public int findMdcDrgsByWeightOver1Cnt(Map<String, Object> paramMap, String mdcCodeLast5) {
		return  wordDRGsReportApplication.findMdcDrgsByWeightOver1Cnt(paramMap,mdcCodeLast5);
	}
	/**
	 * 
	  * @Description:mdc权重大于9的专业   
	  * @param paramMap
	  * @param mdcCodeLast5
	  * @return
	 */
	@Override
	public List<Object[]> findMdcDrgsByWeightOver9List(Map<String, Object> paramMap, String mdcCodeLast5) {
		return  wordDRGsReportApplication.findMdcDrgsByWeightOver9List(paramMap,mdcCodeLast5);
	}
	/**
	 * 
	  * @Description:病组的时间消耗指数  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findDrgsTimeList(Map<String, Object> paramMap) {
		return  wordDRGsReportApplication.findDrgsTimeList(paramMap);
	}
	/**
	 * 
	  * @Description:病组的时间消耗指数  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findDrgsFeeList(Map<String, Object> paramMap) {
		return  wordDRGsReportApplication.findDrgsFeeList(paramMap);
	}
	/**
	 * 
	  * @Description:附表1 全院医疗服务综合能力情况表   
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findHospAbilityList(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findHospAbilityList(paramMap);
	}
	/**
	 * 
	  * @Description:附表1 科室医疗服务综合能力情况表   
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findDepAbilityList(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findDepAbilityList(paramMap);
	}
	/**
	 * 
	  * @Description:附表2 全院DRGs病组覆盖情况指标 
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findHospallDRGsList(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findHospallDRGsList(paramMap);
	}
	/**
	 * 
	  * @Description: 附表2 各MDC专业DRGs病组覆盖情况及医疗服务综合能力情况表 
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findMDCAbilityList(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findMDCAbilityList(paramMap);
	}
	/**
	 * 
	  * @Description:附表3住院病例DRGs总权重最高的前二十位主治医师  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findDocByWeightList(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findDocByWeightList(paramMap);
	}
	/**
	 * 
	  * @Description:附表4CMI值最高的前二十位主治医师  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findDocByCMIList(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findDocByCMIList(paramMap);
	}
	/**
	 * 
	  * @Description:附表5未入组病例覆盖的所有主要诊断  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findNotInGroupDiagList(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findNotInGroupDiagList(paramMap);
	}
	/**
	 * 
	  * @Description:附表6 未入组病例覆盖的所有主要手术/操作  
	  * @param paramMap
	  * @return
	 */
	@Override
	public List<Object[]> findNotInGroupOperList(Map<String, Object> paramMap) {
		return wordDRGsReportApplication.findNotInGroupOperList(paramMap);
	}
	/**
	 * 
	  * @Description:校验数据完整性  
	  * @param dateFrom
	  * @param dateTo
	  * @param benchmarkYear
	  * @param drgVersion
	  * @return
	 */
	@Override
	public List<Object[]> findCheckedData(String dateFrom,String dateTo, String hospCode) {
		return wordDRGsReportApplication.findCheckedData(dateFrom, dateTo, hospCode);
	}
	/**
	 * 
	 *  @Description：分析重点病种
	 *  @Author LiuHongJun  
	 *  @see com.dhcc.DRGsHosp.facade.WordDRGsReportFacade#analyzeMdc(java.util.Map)
	 */
	@Override
	public Object analyzeMdc(Map<String, Object> dto,String groupScheme,String stdId) {
		List<Object[]> list=wordDRGsReportApplication.findMDCFirstOne(dto,groupScheme);
		Map<String,Object> basemap=new HashMap<>();
		Map<String,Object> map=new HashMap<>();
		Map<String,Object> hospmdcmap=new HashMap<>();
		if(!list.isEmpty()){
			Object[] obj=list.get(0);
			basemap.put("totalCaseCnt", obj[0]);
			basemap.put("drgsCaseCnt", obj[1]);
			basemap.put("realdrgsCnt", obj[2]);
			basemap.put("drgsCnt", obj[3]);
			basemap.put("caseRatioCnt", obj[4]);
			basemap.put("drgsRatioCnt", obj[5]);
		}
		dto.put("reportDateFrom", dto.get("dateFrom"));
		dto.put("reportDateTo", dto.get("dateTo"));
		dto.put("hospCode", dto.get("hospCode"));
		dto.put("benchmarkYear", dto.get("stdyear"));
		dto.put("mdcCode", "'" + dto.get("mdcCode") + "'");
		dto.put("drgVersion", dto.get("groupversion"));
		dto.put("mdcCasecnt", basemap.get("drgsCaseCnt"));
		dto.put("stdId", stdId);
		dto.put("groupScheme", groupScheme);
		//获取前十位的病组
		List<Map<String,Object>>  mdcdrgtop10MapList = wordDRGsReportApplication.findmdcDdrgtop10MapList(dto);	
		
		//该专业下病例数最多的前十个病组累计出院病例
		int mdcdrgcasetop10=0;
		double caseratio=0; 
		for(Map<String,Object> mdcmap:mdcdrgtop10MapList){
			int cnt=Integer.valueOf(mdcmap.get("outcase")==null?"0":mdcmap.get("outcase").toString());
			mdcdrgcasetop10+=cnt;
			caseratio=Double.valueOf(mdcmap.get("caseratio")==null?"0":mdcmap.get("caseratio").toString());
		}
		
		//该专业下总权重最多的前十位的病组
		List<Map<String,Object>>  mdcdrgweighttop10MapList = wordDRGsReportApplication.findmdcdrgweighttop10List(dto);
		double mdcdrgweighttop10=0;
		double mdctotalweight=0;
		double weightratio=0;
		for(Map<String,Object> wmap:mdcdrgweighttop10MapList){
			mdctotalweight=Double.valueOf(wmap.get("mdctotalweight")==null?"0":wmap.get("mdctotalweight").toString());
			double weight=Double.valueOf(wmap.get("weight")==null?"0":wmap.get("weight").toString());
			mdcdrgweighttop10+=weight;
			weightratio=Double.valueOf(wmap.get("weightratio")==null?"0":wmap.get("weightratio").toString());
		}
		//表格 13本院与标杆医院MDCH专业比较
		Object[]  listMDCbyTable27= wordDRGsReportApplication.findlistMDCbyTable27(dto);
		hospmdcmap.put("mdcdrgcnt", Arith.dataFormat(listMDCbyTable27[0]+"", "2"));
		hospmdcmap.put("mdccmi", Arith.dataFormat(listMDCbyTable27[1]+"", "1"));
		hospmdcmap.put("mdcefftime", Arith.dataFormat(listMDCbyTable27[3]+"", "1"));
		hospmdcmap.put("mdceffcost", Arith.dataFormat(listMDCbyTable27[2]+"", "1"));
		hospmdcmap.put("mdcrisk1ratio", listMDCbyTable27[4]==null?0:Arith.dataFormat(listMDCbyTable27[4]+"", "1"));
		hospmdcmap.put("mdcrisk2ratio", listMDCbyTable27[5]==null?0:Arith.dataFormat(listMDCbyTable27[5]+"", "1"));	
		
		map.put("basemap", basemap);
		map.put("mdcdrgcasetop10", mdcdrgcasetop10);
		map.put("mdcdrgtop10MapList", mdcdrgtop10MapList);
		map.put("caseratio", caseratio);
		map.put("mdcdrgweighttop10", mdcdrgweighttop10);
		map.put("mdctotalweight", mdctotalweight);
		map.put("mdcdrgweighttop10MapList", mdcdrgweighttop10MapList);
		map.put("weightratio", weightratio);
		map.put("hospmdcmap", hospmdcmap);		
		return map;
	}
	
	/**
	 * 
	 *  @Description：获取mdc
	 *  @Author LiuHongJun  
	 *  @see com.dhcc.DRGsHosp.facade.WordDRGsReportFacade#findMDC(java.util.Map)
	 */
	@Override
	public Object findMDC(String groupScheme) {
		List<Object[]> list=wordDRGsReportApplication.findMDC(groupScheme);
		List<Map<String,Object>> listmap=new ArrayList<>();
		if(!list.isEmpty()){
			for(Object[] obj:list){
				Map<String,Object> map=new HashMap<>();
				map.put("ccode", obj[0]);
				map.put("ddesc", obj[0]+"-"+obj[1]);
				listmap.add(map);
			}
		}
		return listmap;
	}

}
